Skip to content

Simplify CI detection - #50661

Merged
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:cleanup-ci-detection
Sep 6, 2022
Merged

Simplify CI detection#50661
Jake Bailey (jakebailey) merged 2 commits into
microsoft:mainfrom
jakebailey:cleanup-ci-detection

Conversation

@jakebailey

Copy link
Copy Markdown
Member

Pulled out of #50597.

Comment thread .github/workflows/ci.yml Outdated

@amcasey Andrew Casey (amcasey) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this will make it more painful to run the CI lint rules locally but it also seems like no one cares.

Comment thread scripts/build/options.js
const minimist = require("minimist");
const os = require("os");

const ci = ["1", "true"].includes(process.env.CI);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This gets set by the workflow or something, right? It's not something we set elsewhere?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct; GHA sets CI=1 or similar.

@jakebailey

Copy link
Copy Markdown
Member Author

Seems like this will make it more painful to run the CI lint rules locally but it also seems like no one cares.

What do you mean? We don't have any rules that are CI specific anymore, so npm run lint is equivalent to npm run lint -- --ci or what was npm run lint:ci. The only thing --ci changes is the reporter used.

Comment thread Gulpfile.js
task("lint", lint);
task("lint").description = "Runs eslint on the compiler and scripts sources.";
task("lint").flags = {
" --ci": "Runs eslint additional rules",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For posterity, there are no additional rules; all rules already run. Probably this is a leftover from tslint or something.

@microsoft Microsoft (microsoft) locked as resolved and limited conversation to collaborators Oct 22, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants